import { useEnvSetting } from '@/hooks/setting'
import { Router } from 'vue-router'

export function createTitleGuard (router: Router) {
  router.afterEach((to) => {
    document.title = `${useEnvSetting().VITE_APP_TITLE} | ${to.meta.title}`
  })
}
